MKDIR_P = mkdir -p
INSTALL = @INSTALL@
WISEDIR = $(DESTDIR)@prefix@/wiseService
CP = /bin/cp

all:
	echo "WISE!"

check:
	npm ci
	npm run bundle

install:
	$(MKDIR_P) "$(WISEDIR)" "$(WISEDIR)/vueapp"
	$(INSTALL) *.js wiseService.ini.sample package.json package-lock.json $(WISEDIR)
	npm ci
	npm run bundle:min
	$(CP) -pr views $(WISEDIR)
	$(CP) -pr favicon.ico $(WISEDIR)
	$(CP) -pr vueapp/dist "$(WISEDIR)/vueapp"
	(cd $(WISEDIR) ; npm ci --omit=dev)

distclean realclean clean:
	rm -f *.o *.so
